package com.powersystem.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.powersystem.demo.entity.PsLineInfo;
import com.powersystem.demo.mapper.PsLineInfoMapper;
import com.powersystem.demo.service.IPsLineInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@Service
public class PsLineInfoServiceImpl extends ServiceImpl<PsLineInfoMapper, PsLineInfo> implements IPsLineInfoService {

    @Autowired
    private PsLineInfoMapper psLineInfoMapper;

    public IPage<PsLineInfo> selectPageVo(String lineCode,int isStart,int page){
        Page<PsLineInfo> pages = new Page<>(page, 5);
        return  psLineInfoMapper.selectPage(pages, new QueryWrapper<PsLineInfo>()
                .like("lineCode", lineCode).like("isStart", isStart));
    }
}
